package com.tope;


/**
 * <p>Description:</p>
 * <p>Copyright: Copyright (c)2019$</p>
 * <p>Company: Tope</p>
 * <P>Created Date :2019$-08$-22$</P>
 * <P>@version 1.0</P>
 */
public class RegExpTest {
    public static void main(String[] args) {


        String o = "\"paySubjectGroupName\": \"扫码支付\", \"invoiceAmount\": 0, \"type\": 1, \"paySubjectID\": 0, \"creatBy\": \"\", \"payType\": 0, \"price\": 2, \"paySubjectName\": \"微信支付\", \"memberCardNO\": \"\", \"action\": 0, \"id\": 3839007, \"cShopName\": \"营养食堂\", \"paySubjectGroupCode\": \"2001\", \"isPhysicalEvidence\": 0, \"payOrderNo\": \"OP7083772557316327250\", \"groupID\": 0, \"paymentWay\": 0, \"giftItemCount\": 0, \"odmId\": \"0\", \"payMedia\": 0, \"cGroupID\": 325508, \"actionTime\": 20220408165135, \"crmChannelID\": 0, \"payExtend\": \"\", \"cShopID\": 135841618, \"promotionName\": \"\", \"purchaserID\": 0, \"refundOrderNo\": \"TH20220408165135166775\", \"integral\": 0, \"refundAmount\": 0, \"promotionType\": \"\", \"paySubjectCode\": \"20010001\", \"debitAmountGiftTotal\": 0, \"payBusinessNo\": \"\", \"subPayOrderNo\": \"\", \"subBillNo\": \"TH20220408165135166775\", \"isIncludeScore\": 1, \"promotionID\": 0, \"uptime\": \"2022-04-08 16:51:35.893\", \"isJoinReceived\": 1, \"createTime\": 20220408165135, \"memberCardID\": \"\", \"cGroupName\": \"\", \"relationPayOrderID\": \"3819089\", \"refundPayOrderNo\": \"TK7084152966822782802\", \"payStatus\": 1, \"couponCode\": \"\", \"paySubjectRate\": 0";

        String a = "\"paySubjectGroupName\": \"扫码支付\", \"invoiceAmount\": 0, \"type\": 1, \"paySubjectID\": 0, \"creatBy\": \"\", \"payType\": 0, \"price\": 11.1, \"paySubjectName\": \"微信支付\", \"memberCardNO\": \"\", \"action\": 0, \"id\": 3838012, \"cShopName\": \"营养食堂\", \"paySubjectGroupCode\": \"2001\", \"isPhysicalEvidence\": 0, \"payOrderNo\": \"OP7083843355624363858\", \"groupID\": 0, \"paymentWay\": 0, \"giftItemCount\": 0, \"odmId\": \"0\", \"payMedia\": 0, \"cGroupID\": 325508, \"actionTime\": 20220408165055, \"crmChannelID\": 0, \"payExtend\": \"\", \"cShopID\": 135841618, \"promotionName\": \"\", \"purchaserID\": 0, \"refundOrderNo\": \"TH20220408165054659891\", \"integral\": 0, \"refundAmount\": 0, \"promotionType\": \"\", \"paySubjectCode\": \"20010001\", \"debitAmountGiftTotal\": 0, \"payBusinessNo\": \"\", \"subPayOrderNo\": \"\", \"subBillNo\": \"TH20220408165054659891\", \"isIncludeScore\": 1, \"promotionID\": 0, \"uptime\": \"2022-04-08 16:50:55.327\", \"isJoinReceived\": 1, \"createTime\": 20220408165055, \"memberCardID\": \"\", \"cGroupName\": \"\", \"relationPayOrderID\": \"3824125\", \"refundPayOrderNo\": \"TK7084152795024066386\", \"payStatus\": 1, \"couponCode\": \"\", \"paySubjectRate\": 0";

        a = a.replace("\"", "");
        a = a.replace(" ", "");
        String[] split = a.split(",");
        StringBuilder sb = new StringBuilder();
        sb.append("update  tbl_groupmeal_group_dep set ");
        for (String s : split) {
            String[] split1 = s.split(":");
            String p = "";
            if (split1.length == 2) {
                 p= split1[1];
            }
            sb.append(split1[0] + "=" + "'" + p + "'").append(",");
        }
        System.out.println(sb);
    }
}
